package acwing.数组;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

/**
 * 查找整数
 *
 * @author yang
 * @date 2021/12/19
 */
public class 查找整数 {

    static int N = 1010;
    static int n;
    static int[] arr = new int[N];

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        n = Integer.parseInt(br.readLine());
        String[] s = br.readLine().split(" ");
        int a = Integer.parseInt(br.readLine());

        for (int i = 1; i <= n; i++) {
            arr[i] = Integer.parseInt(s[i - 1]);
            if (arr[i] == a) {
                System.out.println(i);
                return;
            }

        }
        System.out.println(-1);
    }

}
